README for replication files

----------------------------

ARTICLE: “Borrowing to Self-Insure? Credit Access and Support for Welfare”
AUTHORS: Jonas Markgraf and Guillermo Rosas

----------------------------

SOFTWARE AND PACKAGES:

	R: R version 4.2.2 (2022-10-31)
	Platform: x86_64-apple-darwin17.0
    	Operating System: macOs
	
----------------------------

Replication of all results in the paper requires reading three files with R source code. We recommend running them in the following order, even though the files do not depend on running them in this sequence:

1. observational_fe-models.R
2. analyze-conjoint_data.R
3. pap_analysis.R




FILE LIST:

README.txt:  This file

analyze-conjoint_data.R: 
	contains all analyses of dataset from conjoint experiment except the pre-analysis plan analysis

cleanedConjointData_exp1_12032023.csv: 
	cleaned and anonymized dataset from conjoint experiment

CODEBOOK.html:
	File with description of variables employed in all analysis

Conjoint_DiD-functions.R: 
	contains functions called by 'analyze-conjoint_data.R' to conduct Diff-in-Diff estimation
	(called from within analyze-conjoint_data.R)

Data_Extract_From_World_Development_Indicators.xlsx:

finalESS.dta: 
	ESS dataset (prepared using Thewissen & Rueda's code:
	https://journals.sagepub.com/doi/10.1177/0010414017740600)

function_combine_mi_estimates.R: 
	contains function to combine estimates from multiple imputation
	(called from within observational_fe-models.R)

imputedDatasetsCreditPreferences.RData:
	Imputed datasets. Running "observational_fe-models.R" will regenerate this file, potentially producing slightly different results

observational_fe-models.R: 
	contains all analyses of observational ESS dataset

pap_analysis.R:
	contains analysis of the conjoint dataset following the pre-analysis plan



TABLES and FIGURES:

Table 1:
	File: observational_fe-models.R
	Lines: 131-203

Figure 1:
	File: observational_fe-models.R
	Lines: 204-315

Figure 2:
	File: analyze-conjoint_data.R
	Lines: 29-45

Table 3:
	File: analyze-conjoint_data.R
	Lines: 46-272

Figure B.1:
	File: observational_fe-models.R
	Lines: 316-329
	Note: this figure was updated since submitting the manuscript (minor changes)

Table B.1:
	File: observational_fe-models.R
	Lines: 329-336


Figure B.2:
	File: observational_fe-models.R
	Lines: 337-461

Table B.2:
	File: observational_fe-models.R
	Lines: 362-381

Table B.3:
	File: observational_fe-models.R
	Lines: 382-518

Figure C.1:
	File: observational_fe-models.R
	Lines: 519-580

Table C.1:
	File: observational_fe-models.R
	Lines: 581-649

Figure F.1:
	File: analyze-conjoint_data.R
	Lines: 274-289
	Note: we removed Figure F.1 from the previous manuscript as it was already in main text (Fig 2)

Figure F.2:
	File: analyze-conjoint_data.R
	Lines: 290-305

Table F.1:
	File: analyze-conjoint_data.R
	Lines: 306-484

Table F.2:
	File: analyze-conjoint_data.R
	Lines: 485-583

Figure G.1:
	File: analyze-conjoint_data.R
	Lines: 584-600

Table G.1:
	File: analyze-conjoint_data.R
	Lines: 601-822
	Note: estimates in model 1 have changed from submitted manuscript, but conclusions remain unchanged

Table G.2:
	File: analyze-conjoint_data.R
	Lines: 823-920

Table G.3:
	File: analyze-conjoint_data.R
	Lines: 921-1015

Figure G.2:
	File: analyze-conjoint_data.R
	Lines: 1016-1027

Table G.4:
	File: analyze-conjoint_data.R
	Lines: 1028-1122

Table H.1:
	File: pap_analysis.R
	Lines: 59-91

Table H.2:
	File: pap_analysis.R
	Lines: 94-142

Table H.3:
	File: pap_analysis.R
	Lines: 143-191

Table H.4:
	File: pap_analysis.R
	Lines: 192-242

Table H.5:
	File: pap_analysis.R
	Lines: 243-290

Table H.6:
	File: pap_analysis.R
	Lines: 291-338

Table H.7:
	File: pap_analysis.R
	Lines: 339-389

Table H.8:
	File: pap_analysis.R
	Lines: 390-437

Table H.9:
	File: pap_analysis.R
	Lines: 438-485

Table H.10:
	File: pap_analysis.R
	Lines: 486-533

Table H.11:
	File: pap_analysis.R
	Lines: 534-580




